#include "UDTime.h"

void Time::set(int y,int mon,int d,int h,int miu,int s)
{
	year = y;
	month = mon;
	day = d;
	hour = h;
	minute = miu;
	second = s;
}
bool operator<(Time left, Time right)//before
{
	if(left.year < right.year)
		return true;
	else if(left.year == right.year)
	{
		if(left.month < right.month)
		    return true;
	    else if(left.month == right.month)
		{
			if(left.day < right.day)
		        return true;
			else if(left.day == right.day)
			{
				if(left.hour < right.hour)
					 return true;
				else if(left.hour == right.hour)
				{
					if(left.minute < right.minute)
						return true;
					else if(left.minute == right.minute)
					{
						if(left.second < right.second)
							return true;
						else
							return false;
					}
				}
			}
		}
	}

	return false;
}
